﻿using System;
using VisionCloud.Utility;
namespace VisionCloud.Domain.Binder
{

    [AttributeUsage(AttributeTargets.Property)]
    public class GuidAttribute : Attribute, IGuidAttribute
    {
        public object Guid(string value, out bool success)
        {
            var tryModelValue = string.IsNullOrEmpty(value) ? System.Guid.Empty : value.ToGuid();

            success = true;

            return tryModelValue;
        }
    }
}
